<template>
  子组件A：{{ student.name }}<br>
  <childb></childb>
</template>

<script>
import { inject } from '@vue/runtime-core'

import childb from './childB.vue'
export default {
    components: {
        childb
    },
    setup () {
        const student = inject('info')
        return {
            student
        }
    }
}
</script>

<style>

</style>